]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
6 years agost/theme-context: Also remove theme nodes on stylesheet changes
Jonas Dreßler [Sat, 25 Apr 2020 11:17:13 +0000 (13:17 +0200)]
st/theme-context: Also remove theme nodes on stylesheet changes

StThemeNodes are built around the assumption that they're "immutable",
that means they are created once with certain parameters (that resolve
to certain css properties) and then replaced with new ones in case those
parameters changed.

Changes to the internal information stored by theme nodes (i.e. the css
properties, font names or the cached scale-factor) are not all handled
the same though: For changes to the font or the scale-factor we remove
all theme nodes from the cache and let the widgets which are on stage
generate new theme nodes. For changes to the css properties/the
stylesheet, we invalidate the properties of all theme nodes but keep
them in the cache using `_st_theme_node_reset_for_stylesheet_change()`.

So be a bit more consistent and handle changes to the css-properties/the
stylesheet stored by StThemeNodes the same way as changes to the font or
scale-factor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1218

6 years agost: Ensure to reset all widget theme nodes
Carlos Garnacho [Sat, 25 Apr 2020 16:31:11 +0000 (18:31 +0200)]
st: Ensure to reset all widget theme nodes

Theme node invalidation stops at unmapped widgets, and widgets
that forget to chain up to the default ::style-changed implementation.
This may leave stale nodes that were invalidated on
StThemeContext::changed, but are still set on widgets, and maybe
used for CSS property lookups.

Make sure that theme node invalidation happens always by moving
propagation outside the vfunc, and ensure the theme nodes are reset
across the full actor tree. Emission of ::style-changed, and obtaining
a new theme node may be delayed till when the actor is mapped.

The theme node is also cleared after unparenting an actor to avoid
stale references.

This ensures that all widgets get their theme node cleared after
stylesheet changes, instead of maybe being left with a theme node
that's been cleared of all its properties.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2541
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1223

6 years agoUpdate Turkish translation
Emin Tufan Çetin [Tue, 28 Apr 2020 13:19:54 +0000 (13:19 +0000)]
Update Turkish translation

6 years agoci: Rebase extension-ci image to F32
Florian Müllner [Sat, 4 Apr 2020 00:03:24 +0000 (02:03 +0200)]
ci: Rebase extension-ci image to F32

... and base our 'js' test on the js engine we are actually using.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1177

6 years agoci: Document how to build the image
Florian Müllner [Sat, 4 Apr 2020 00:35:12 +0000 (02:35 +0200)]
ci: Document how to build the image

Updating the CI image is rare enough to not know the involved
commands by heart, so adding a comment like mutter did a while
ago makes perfect sense.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1177

6 years agoci: Rename Dockerfile
Florian Müllner [Sat, 4 Apr 2020 00:22:00 +0000 (02:22 +0200)]
ci: Rename Dockerfile

Our primary image now comes from mutter, so the default Dockerfile
name is free for our JS image.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1177

6 years agokeyboard: Minor cleanup
Florian Müllner [Sat, 4 Apr 2020 00:00:35 +0000 (02:00 +0200)]
keyboard: Minor cleanup

Use the more concise operator shorthand.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1177

6 years agocleanup: Don't linebreak before closing parentheses
Florian Müllner [Fri, 3 Apr 2020 23:52:29 +0000 (01:52 +0200)]
cleanup: Don't linebreak before closing parentheses

Otherwise recent versions of eslint want "dangling" commas,
which is at least ugly considering that most functions don't
allow adding arguments at leasure.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1177

6 years agooverviewControls: Remove transitions before updating adjustment value
Florian Müllner [Mon, 27 Apr 2020 23:04:08 +0000 (01:04 +0200)]
overviewControls: Remove transitions before updating adjustment value

The workspace switcher blocks state updates while the indicator is
animating. Since commit 9c1940ef9db5 the indicator is considered to
be animating when the workspace adjustment's value doesn't equal the
active workspace.

There is one case though where this breaks badly: When a workspace
is inserted before the active one, the adjustment's upper and value
properties are changed without transitions. But if that change happens
while there's an ongoing transition to the previously active workspace,
the value gets out of sync with the active workspace and we end up
blocking state updates indefinitely.

Fix this by removing any transitions before setting the adjustment
value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2625

6 years agoci: Cache eslint results
Florian Müllner [Sat, 14 Mar 2020 15:15:45 +0000 (16:15 +0100)]
ci: Cache eslint results

While this isn't useful during CI, it can provide a massive speed-up
when used locally.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1094

6 years agoAdd small gnome-shell-extension-prefs script
Florian Müllner [Mon, 27 Apr 2020 19:57:33 +0000 (21:57 +0200)]
Add small gnome-shell-extension-prefs script

Commit d76162c1c047c removed the ability to pass an extension UUID to
the Extensions app, when we moved the dialog to a portal and made
gnome-shell use it instead of spawning the extensions app.

However that missed that many extensions called out to the app to
open their own prefs.

While extensions are encouraged to switch to the new openPrefs()
convenience method added in commit 8030d9ad323e, restore the old
behavior with a small script under the old gnome-shell-extension-prefs
name that either calls out to the portal or launches the app.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1220

6 years agoextensions-app: Rename executable
Florian Müllner [Fri, 10 Apr 2020 02:27:31 +0000 (04:27 +0200)]
extensions-app: Rename executable

We kept the old binary name when overhauling the tool for the Extensions
app to avoid unnecessary churn for packagers/distributors.

However we now have a reason to "free" the old name, so rename the binary
to match the (sub)project name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1220

6 years agokeyboard: Add missing setter
Florian Müllner [Mon, 27 Apr 2020 21:45:21 +0000 (23:45 +0200)]
keyboard: Add missing setter

We override the :visible property for the keyboard actor, but don't
provide a corresponding setter. The property is therefore read-only
on the javascript level, and any attempt to set it will fail.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2691

6 years agoaltTab: Set allocation before allocating children
Jonas Dreßler [Thu, 12 Mar 2020 12:37:53 +0000 (13:37 +0100)]
altTab: Set allocation before allocating children

Just as with the last commit, we should not break the assumption made by
Clutter that parents have their allocation set before their children get
allocated, so fix that here, too.

In this case we have to fix it by chaining up to the parent vfunc
override and updating the allocation once more before allocating the
`this._label` child.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1615

6 years agoboxpointer: Call set_allocation before allocating child
Jonas Dreßler [Tue, 10 Mar 2020 10:05:13 +0000 (11:05 +0100)]
boxpointer: Call set_allocation before allocating child

It's important to update the allocation of the parent before allocating
its children, it's an assumption we make in a lot of places.

This broke resource scale calculation for boxpointers and their
children when multiple monitors with different scales are used and the
primary monitor is not positioned at x=0, y=0.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1615

6 years agocalendar-server: Improve performance by properly using ECalClientView
Milan Crha [Thu, 2 Apr 2020 07:24:28 +0000 (09:24 +0200)]
calendar-server: Improve performance by properly using ECalClientView

The previous code always restarted whole ECalClientView when it received
any changes in it, which could sometimes lead to constant repeated restarts
of the view.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1875

6 years agocalendar-server: Drop separate private struct
Florian Müllner [Wed, 22 Apr 2020 15:01:31 +0000 (17:01 +0200)]
calendar-server: Drop separate private struct

CalendarSources is a final type, so the regular instance struct is
already non-public. No need for a separate private struct and priv
pointer ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1875

6 years agocalendar-server: Add missing spaces
Florian Müllner [Wed, 22 Apr 2020 15:10:31 +0000 (17:10 +0200)]
calendar-server: Add missing spaces

... according to coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1875

6 years agocalendar-server: Replace tabs with spaces
Florian Müllner [Wed, 22 Apr 2020 14:04:05 +0000 (16:04 +0200)]
calendar-server: Replace tabs with spaces

... according to the coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1875

6 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 27 Apr 2020 16:14:01 +0000 (18:14 +0200)]
Updated Spanish translation

6 years agojs/main: Inhibit remote access when depending on session mode
Jonas Ådahl [Tue, 21 Apr 2020 14:13:20 +0000 (16:13 +0200)]
js/main: Inhibit remote access when depending on session mode

The session mode determines whether the screen casting should work or
not, but until now only dealt with the built in screen cast, not the
ones using PipeWire. Add the newly added API for inhibiting remote
access when the session mode says screencasts are not allowed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1210

6 years agoshell/global: Add 'backend' property
Jonas Ådahl [Tue, 21 Apr 2020 16:04:56 +0000 (18:04 +0200)]
shell/global: Add 'backend' property

Replace all Meta.get_backend() with global.backend. Maybe sooner or
later we can further decrease the amount of singletons handled by
libmutter.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1210

6 years agocroco: Remove duplicated conditions
qarmin [Mon, 27 Apr 2020 12:07:18 +0000 (14:07 +0200)]
croco: Remove duplicated conditions

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1219

6 years agoci: Simplify flatpak job
Florian Müllner [Fri, 24 Apr 2020 21:29:06 +0000 (23:29 +0200)]
ci: Simplify flatpak job

The template has been updated to rewrite the manifest to use the
checked out tree, so it's no longer necessary to pass additional
build arguments (which are now ignored) or generate translations
before the build (it's already in the manifest).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1217

6 years agoRevert "ci: Revert to a previous version of the flatpak template"
Florian Müllner [Fri, 24 Apr 2020 21:27:38 +0000 (23:27 +0200)]
Revert "ci: Revert to a previous version of the flatpak template"

This reverts commit 1ff638a51fee49f070656319888e34a0c552884d.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1217

6 years agoJS: migrate from the global `window` to `globalThis`
Andy Holmes [Thu, 23 Apr 2020 23:06:36 +0000 (16:06 -0700)]
JS: migrate from the global `window` to `globalThis`

As of mozjs68 (gjs-1.64) `globalThis` is recommended over `window` and
it makes more sense in this context anyways. Migrate the few instances
of `window` we use and adjust the eslint configuration.

`window` will continue to resolve to `globalThis`, so this won't affect
extensions or other downstream users.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2322

closes #2322

6 years agocalendar: Do less work in hasEvents()
Florian Müllner [Thu, 2 Apr 2020 21:46:48 +0000 (23:46 +0200)]
calendar: Do less work in hasEvents()

getEvents() filters all events for the given range and sorts the result.

That's more than we need when checking whether there are any events,
where we only care that there's at least one event in the range.

Address this by splitting out the event filtering into a generator
function, so hasEvents() can return after at most one iteration.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1192

6 years agocalendar: Update events on changes
Florian Müllner [Thu, 9 Apr 2020 10:50:39 +0000 (12:50 +0200)]
calendar: Update events on changes

We track messages so that we can account for just added and removed
events instead of having to rebuild the entire list, however it's
also possible that the time or summary of an existing event changed.

Account for that by updating existing messages in-place.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1192

6 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sat, 25 Apr 2020 17:21:35 +0000 (17:21 +0000)]
Update Basque translation

6 years agoauthPrompt: Grab key focus when making entry sensitive
Jonas Dreßler [Wed, 22 Apr 2020 15:27:54 +0000 (17:27 +0200)]
authPrompt: Grab key focus when making entry sensitive

We currently let the entry of the autoPrompt grab the key focus inside
setQuestion(), which is called from _onAskQuestion(), which is the
callback of the "ask-question" signal.

It seems that the "ask-question" signal isn't emitted again right after
the password-check failed, but a few seconds after that. Since we get
the "verification-failed" signal earlier than "ask-question" (right
after we know the check failed) and we also get a hint whether the entry
should be usable again with the canRetry argument, we can also grab key
focus to in the same step.

So do that by grabbing key focus when making the entry sensitive.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2655

6 years agounlockDialog: Call AuthPrompt.addCharacter() directly
Jonas Dreßler [Wed, 22 Apr 2020 19:14:13 +0000 (21:14 +0200)]
unlockDialog: Call AuthPrompt.addCharacter() directly

The additional function UnlockDialog.addCharacter() is only used at one
place, so we can simply remove it and call AuthPrompt.addCharacter()
directly. The AuthPrompt is shown right before that anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1209

6 years agosystemActions: include ASCII alternatives in search index
Will Thompson [Sat, 25 Apr 2020 09:54:55 +0000 (10:54 +0100)]
systemActions: include ASCII alternatives in search index

With this change, "eteindre" matches "éteindre" (the French translation
for "power off"), consistent with search for applications where "e"
matches "é".

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2688

6 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sat, 25 Apr 2020 08:08:40 +0000 (08:08 +0000)]
Update Ukrainian translation

6 years agoscreenShield: Don't inhibit suspend during initial setup
Matthew Leeds [Fri, 24 Apr 2020 21:42:52 +0000 (14:42 -0700)]
screenShield: Don't inhibit suspend during initial setup

Normally, we inhibit suspend while locking the screen. But in the
session mode used for gnome-initial-setup locking is not supported, so
in that case this inhibit call is pointless and should be avoided.
Without this patch you get the following error when you suspend and
resume during initial setup:

JS ERROR: Error getting systemd inhibitor: Gio.IOErrorEnum:
GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation
inhibition has been requested for is already running
_promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:435:45

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1213

6 years agoscreenShield: Fix use of null this._dialog
Matthew Leeds [Fri, 24 Apr 2020 00:42:16 +0000 (17:42 -0700)]
screenShield: Fix use of null this._dialog

On Fedora 32 if you close the laptop lid during gnome-initial-setup,
gnome-shell hits this error:

JS ERROR: Exception in callback for signal: prepare-for-sleep: TypeError: this._dialog is undefined
_resetLockScreen@resource:///org/gnome/shell/ui/screenShield.js:434:9
activate@resource:///org/gnome/shell/ui/screenShield.js:571:14
lock@resource:///org/gnome/shell/ui/screenShield.js:617:14
_prepareForSleep@resource:///org/gnome/shell/ui/screenShield.js:219:22
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
_prepareForSleep@resource:///org/gnome/shell/misc/loginManager.js:198:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
_convertToNativeSignal@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:169:19

This is because _ensureUnlockDialog() hit its first early return. So
return early from activate() in that case, so this._dialog doesn't get
used while it's null.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1213

6 years agoUpdate Persian translation
Danial Behzadi [Fri, 24 Apr 2020 20:06:24 +0000 (20:06 +0000)]
Update Persian translation

6 years agoci: Revert to a previous version of the flatpak template
Jordan Petridis [Fri, 24 Apr 2020 16:18:20 +0000 (19:18 +0300)]
ci: Revert to a previous version of the flatpak template

A new version seems to be causing some issues, so
use the previous revision until it's resolved

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1214

6 years agoappDisplay: Return the parent class' result in overrides
Georges Basile Stavracas Neto [Thu, 23 Apr 2020 22:04:27 +0000 (19:04 -0300)]
appDisplay: Return the parent class' result in overrides

StButton returns CLUTTER_EVENT_STOP in various circumstances, but
AppIcon throws that away and returns CLUTTER_EVENT_PROPAGATE even
when it should stop.

Return the parent class' result instead of CLUTTER_EVENT_PROPAGATE.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1211

6 years agoappDisplay: Use const instead of let in vfunc_leave_event
Georges Basile Stavracas Neto [Thu, 23 Apr 2020 22:03:17 +0000 (19:03 -0300)]
appDisplay: Use const instead of let in vfunc_leave_event

The return value of the chain up is not changed, let's use the
proper descriptor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1211

6 years agost: Update to new API for creating paint context
Jonas Ådahl [Tue, 21 Apr 2020 07:03:43 +0000 (09:03 +0200)]
st: Update to new API for creating paint context

It now takes a redraw clip and flags.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1207

6 years agoUpdate Czech translation
Petr Kovář [Wed, 22 Apr 2020 13:01:15 +0000 (13:01 +0000)]
Update Czech translation

6 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Wed, 22 Apr 2020 12:32:56 +0000 (12:32 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit 60ee6ab4b7ff1579e46e77153547c0511ba6959c)

6 years agotest-theme: Check return value of chdir()
Will Thompson [Tue, 21 Apr 2020 12:44:57 +0000 (13:44 +0100)]
test-theme: Check return value of chdir()

I noticed the following warning while building the .deb package for
gnome-shell on Endless OS:

      ../src/st/test-theme.c: In function ‘main’:
      ../src/st/test-theme.c:549:3: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
         chdir (cwd);
         ^~~~~~~~~~~

(Of course this is very unlikely to fail in practice.)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1208

6 years agologinDialog: Get resource scale by get_resource_scale
Xiaoguang Wang [Tue, 21 Apr 2020 08:17:09 +0000 (16:17 +0800)]
loginDialog: Get resource scale by get_resource_scale

To shut up 'Getting invalid resource scale property' warnings in the log.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1206

6 years agomessageTray: Make NotificationPolicy properties read-only
Philip Chimento [Tue, 21 Apr 2020 00:25:14 +0000 (17:25 -0700)]
messageTray: Make NotificationPolicy properties read-only

These properties are never written; in the base class they are always
their default values, and in the subclasses the getters are overridden.

This will be necessary because GJS is adding checks to make sure that
readable properties always have a getter, writable properties always
have a setter, and that the variations of camelCase/snake_case are
handled correctly. It's supposedly backwards compatible, but that
assumes that code is not doing things like forgetting a setter on a
writable property. (If the missing setter had ever been called, it might
have led to a crash, which is why we've made this change.)

This is the minimally invasive patch which should work with both older
and newer versions of GJS. If you decide to require GJS 1.65.2, then
you'll also be able to remove the getters from NotificationPolicy as
well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1205

6 years agoUpdate zh_CN translations
Dingzhong Chen [Sat, 18 Apr 2020 09:10:21 +0000 (09:10 +0000)]
Update zh_CN translations

6 years agoauthPrompt: Fix spinner alignment
Florian Müllner [Mon, 13 Apr 2020 16:55:34 +0000 (18:55 +0200)]
authPrompt: Fix spinner alignment

We want the spinner to be centered with regard to the entry, but
constraining the height breaks that:

 1. clutter_actor_allocate() is called with the available size
 2. clutter_actor_update_constraints() then adjusts that according
    to the constraints
 3. clutter_actor_adjust_allocation() applies the margin/expand/align
    properties.

The issue there is that 2. reduces the allocation to the desired size,
so there is no more extra space to distribute in 3.

We can fix this by either constraining everything (and rely on the
cancel button's alignment) or limit the constraint to the width. The
latter seems more appropriate, given that the constraint is only used
to center the entry horizontally.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2628

6 years agowindowManager: Fix ngettext() call
Florian Müllner [Thu, 16 Apr 2020 22:49:24 +0000 (00:49 +0200)]
windowManager: Fix ngettext() call

We don't pass the number that allows gettext to decide on the
correct string, whoops.

Spotted by Alexandre Franke.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2649

6 years agopolkitAgent: Reset the session request timeout when removing it
Marco Trevisan (Treviño) [Fri, 17 Apr 2020 15:54:52 +0000 (17:54 +0200)]
polkitAgent: Reset the session request timeout when removing it

When handing the resetDialog request we're leaving a source ID alive,
leading this error:

(gnome-shell:22464): GLib-CRITICAL **: 17:46:11.065: Source ID 12934 was not
found when attempting to remove it:

== Stack trace for context 0x55c9246916c0 ==
#0 55c9249151b8 i   js/ui/components/polkitAgent.js:391 (11f71fd544c0 @ 100)
#1 7ffc55140aa0 b   self-hosted:1009 (3062ba49af88 @ 423)
#2 55c924915120 i   js/ui/modalDialog.js:167 (1c9e50ae9880 @ 62)
#3 55c924915098 i   js/ui/modalDialog.js:186 (1c9e50ae9970 @ 12)
#4 55c924915008 i   js/ui/environment.js:75 (1c9e50a8d5b0 @ 98)
#5 55c924914f78 i   js/ui/environment.js:149 (1c9e50a8d9e8 @ 14)

So, reset the source handle to avoid trying to remove it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203

6 years agopolkitAgent: Return GLib.SOURCE_REMOVE on timeout callback
Marco Trevisan (Treviño) [Fri, 17 Apr 2020 15:51:27 +0000 (17:51 +0200)]
polkitAgent: Return GLib.SOURCE_REMOVE on timeout callback

resetDialog is used (also) as GLib timeout function, so while just returning
an undefined value will stop the timeout anyways, it's just cleaner to
use the GSource expected return values

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1203

6 years agojs/ui: Always use namespace for animation modes
Jonas Ådahl [Wed, 15 Apr 2020 09:16:32 +0000 (11:16 +0200)]
js/ui: Always use namespace for animation modes

Clutter.Animation doesn't contain any animation modes, they live in
Clutter.AnimationMode. The places we did `Clutter.Animation.WHATEVER`
just evaluated to `undefined`. Thus, use the correct namespace for the
animation mode enums.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1199

6 years agojs: Drop tweener.js
Jonas Ådahl [Wed, 15 Apr 2020 09:24:10 +0000 (11:24 +0200)]
js: Drop tweener.js

We're using clutter's animation framework now, so lets drop the old
tweener support layer.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1200

6 years agobuild: Obtain systemduserunitdir from pkg-config
Jan Tojnar [Fri, 10 Apr 2020 11:43:25 +0000 (13:43 +0200)]
build: Obtain systemduserunitdir from pkg-config

Previously, this prevented local installation because systemd did not
make the variable's prefix overridable

https://github.com/systemd/systemd/issues/9595

but since it has been fixed in systemd 242, we can finally use that.

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agobuild: Install keybindings relative to our datadír
Jan Tojnar [Thu, 9 Apr 2020 20:25:32 +0000 (22:25 +0200)]
build: Install keybindings relative to our datadír

It is a good practice to install files relative to our own variables

https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

and it is required on systems like NixOS.

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agoextension-tool/build: Install completions relative to our datadír
Jan Tojnar [Thu, 9 Apr 2020 18:38:02 +0000 (20:38 +0200)]
extension-tool/build: Install completions relative to our datadír

It is a good practice to install files relative to our own variables

https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

and it is required on systems like NixOS.

Thanks to Iñigo, bash-completion support that since 2.10:

https://github.com/scop/bash-completion/pull/344

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194

6 years agoUpdate Finnish translation
Jiri Grönroos [Mon, 13 Apr 2020 15:03:18 +0000 (15:03 +0000)]
Update Finnish translation

(cherry picked from commit cc0fac895c7f0bd0c2bf2c7f6af483de390c1730)

6 years agoappDisplay: Look up directory- instead of category translations
Florian Müllner [Sun, 12 Apr 2020 15:15:48 +0000 (17:15 +0200)]
appDisplay: Look up directory- instead of category translations

Translations are provided by .directory files, so trying to look
up a category name without the suffix will always fail.

Commit 343b3351f1 tried to fix this previously by changing the
saved keys, but that broke existing translatable folders.

Appending the .directory suffix for the lookup instead fixes the
issue without regressing non-custom folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2623

6 years agoRevert "app-cache: Fix cache for folder translations"
Florian Müllner [Mon, 13 Apr 2020 13:41:54 +0000 (15:41 +0200)]
Revert "app-cache: Fix cache for folder translations"

Existing folders as created by gnome-software (including the
default ones) all have the .directory suffix, so dropping
the suffix from the keys broke those folders.

This reverts commit 343b3351f172e112e1a70b54956ab3444140fbf4.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2623

6 years agoUpdate Esperanto translation
Carmen Bianca BAKKER [Sat, 11 Apr 2020 18:21:21 +0000 (18:21 +0000)]
Update Esperanto translation

6 years agodateMenu: Update empty weather label
Mariana Picolo [Sun, 5 Apr 2020 07:39:02 +0000 (04:39 -0300)]
dateMenu: Update empty weather label

Remove subtitle for the empty weather state
to match world clocks button.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2179

6 years agoappDisplay: Reorganize AppDisplay actor hierarchy
Georges Basile Stavracas Neto [Wed, 11 Dec 2019 18:07:16 +0000 (15:07 -0300)]
appDisplay: Reorganize AppDisplay actor hierarchy

Right now, the actor hierarchy is such that the scroll view
does not contain the actual grid. It looks as follows:

              StScrollView
                    ↓
               StBoxLayout
                    ↓
                ShellStack
                ↓        ↓
   PaginatedIconGrid     StWidget

This hierarchy can be slightly reorganized by changing it to be as
follows:

            ShellStack
             ↓     ↓
   StScrollView   StWidget
        ↓
   StBoxLayout
        ↓
 PaginatedIconGrid

This will simplify future work where the PaginatedIconGrid will be
an implementation of StScrollable, in which case we'll be able to
simply remove the StBoxLayout from there.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1191

6 years agost/entry: Allow hint actor to shrink
Florian Müllner [Wed, 8 Apr 2020 22:05:20 +0000 (00:05 +0200)]
st/entry: Allow hint actor to shrink

We currently always ignore the minimum width of the hint actor and
request/allocate the preferred width. This can be problematic with
labels with long text, where we should rather ellipsize the text
than allow the entry to grow indefinively.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2607

6 years agobuild: Bump version requirement
Florian Müllner [Thu, 5 Mar 2020 14:35:48 +0000 (15:35 +0100)]
build: Bump version requirement

We are currently optionally using a 0.53 feature, bump the requirement
to make it non-optional.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1186

6 years agoextensions-tool: Add small indicator template
Florian Müllner [Wed, 6 Nov 2019 09:44:28 +0000 (10:44 +0100)]
extensions-tool: Add small indicator template

Adding an additional icon to the top bar is one of the more common
patterns used by extensions. Make this easier by providing a template
for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Prompt for template when appropriate
Florian Müllner [Thu, 7 Nov 2019 14:16:34 +0000 (15:16 +0100)]
extensions-tool: Prompt for template when appropriate

When creating an extension interactively, we currently always use
the default template unless the --template option is used.

Instead, display the list of available templates to the user and
prompt them to pick one if it wasn't specified.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add --template create option
Florian Müllner [Thu, 7 Nov 2019 11:46:47 +0000 (12:46 +0100)]
extensions-tool: Add --template create option

We now have everything in place to allow users to pick a template
other than the default one (although at the moment it's the only
one we have), so add a corresponding option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add hidden --list-templates option
Florian Müllner [Thu, 7 Nov 2019 14:36:35 +0000 (15:36 +0100)]
extensions-tool: Add hidden --list-templates option

This isn't a very useful option on its own, but will be used to
provide completions for a user-visible --template option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Add template metadata
Florian Müllner [Fri, 8 Nov 2019 23:20:08 +0000 (00:20 +0100)]
extensions-tool: Add template metadata

When we allow users to choose between different templates, we should
provide some context for each template to facilitate that choice.

Add that metadata in the form of a .desktop file, which allows us to
specify name and description, and is well supported by our translation
infrastructure.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Prepare for alternative templates
Florian Müllner [Wed, 6 Nov 2019 09:06:11 +0000 (10:06 +0100)]
extensions-tool: Prepare for alternative templates

The template used when creating a new extension is intentionally
minimal, as the sample code in the old extensions-tool proved to
be annoying more often than not.

However as we support per-command options, we don't have to limit
ourselves to a single template, and can offer alternatives for
common use cases.

To prepare for that, namespace the existing template by moving it
into a subfolder.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Separate create metadata when prompting
Florian Müllner [Sun, 10 Nov 2019 02:00:37 +0000 (03:00 +0100)]
extensions-tool: Separate create metadata when prompting

When using the create command's --interactive option, we prompt for
any metadata that wasn't passed on the command line. As every prompt
is preceded by a short multi-line description, it is hard to follow
when everything is lumped together.

Improve legibility by separating all prompts by newlines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoextensions-tool: Handle NULL input when prompting for metadata
Florian Müllner [Mon, 6 Apr 2020 23:49:30 +0000 (01:49 +0200)]
extensions-tool: Handle NULL input when prompting for metadata

g_data_input_stream_read_line_utf8() may return NULL, for example
when interrupting the prompt with ^D. Handle that case and keep
prompting until we got a line.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoci: Handle POTFILES.skip in potfiles check
Florian Müllner [Tue, 10 Mar 2020 00:39:09 +0000 (01:39 +0100)]
ci: Handle POTFILES.skip in potfiles check

Allow marking files as ignored when searching for translatable
strings, similar to "good" ol' intltool.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

6 years agoappFavorites: Hide favourites which are blacklisted by parental controls
Philip Withnall [Tue, 31 Mar 2020 09:33:18 +0000 (10:33 +0100)]
appFavorites: Hide favourites which are blacklisted by parental controls

If a favourite is set for an app which is blocked by parental controls,
that favourite should be hidden.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agosearch: Hide search providers which are blacklisted by parental controls
Philip Withnall [Mon, 30 Mar 2020 11:40:11 +0000 (12:40 +0100)]
search: Hide search providers which are blacklisted by parental controls

If a search provider is installed by an app which is blacklisted for the
current user by their parental controls, don’t show it or results for
it.

Currently, this only filters ‘remote’ (not built-in to the shell) search
providers. This seems fine for now; in future it could be expanded to
also filter built-in search providers, if any of them end up needing to
be filtered.

No corresponding changes need to be made `remoteSearch.js`, because the
results of `loadRemoteSearchProviders()` are filtered in `search.js`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agojs: Add support for parental controls filtering to the desktop
Philip Withnall [Wed, 24 Apr 2019 09:37:10 +0000 (10:37 +0100)]
js: Add support for parental controls filtering to the desktop

Filter the apps shown on the desktop and in search results according to
whether they are blacklisted by the user’s parental controls.

This supports dynamically updating the filter during the user’s session.

This adds an optional dependency on libmalcontent. If that’s unavailable, no
parental controls filtering will occur.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agoutil: Add a wrapper around getuid()
Philip Withnall [Thu, 22 Nov 2018 15:03:04 +0000 (15:03 +0000)]
util: Add a wrapper around getuid()

So we can use it from JS in an upcoming commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465

6 years agobuild: Bump gjs requirement
Florian Müllner [Fri, 3 Apr 2020 02:04:34 +0000 (04:04 +0200)]
build: Bump gjs requirement

We require gjs!410 for commit 764527. There has been a gjs release
with that change now, so bump the requirement accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2559

6 years agoci: Update to F32-based image
Florian Müllner [Fri, 3 Apr 2020 22:58:47 +0000 (00:58 +0200)]
ci: Update to F32-based image

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2559

6 years agobluetooth: Do not update hadSetupDevices on adapter changes
Florian Müllner [Fri, 3 Apr 2020 18:44:41 +0000 (20:44 +0200)]
bluetooth: Do not update hadSetupDevices on adapter changes

While we now deal more gracefully with adapter removals, we can
still mess up the hadSetupDevices tracking:

As adapters become available before any devices, we'll always
reset the setting to false when Bluetooth is turned on. And if
no set up device happens to be in range, it will still be false
when Bluetooth is turned off again.

To address that, only update the setting if we have an adapter
(like we do now) and we had one before (so it wasn't the adapter
itself that changed).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agobluetooth: Do not sync() immediately on model changes
Florian Müllner [Fri, 3 Apr 2020 18:27:34 +0000 (20:27 +0200)]
bluetooth: Do not sync() immediately on model changes

Our intended behavior when bluetooth is turned off is to keep
the menu visible if devices had been set up previously.

However since gnome-bluetooth@c437c729, devices are removed
first before removing the default adapter, so we now end up
always setting the property to false before checking for it.

Fix this by deferring all model changes to an idle, so that
we can process them as a unit. Do the same for proxy property
changes, as those may trigger a row-removal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agobluetooth: Fix showing menu when devices were set up
Florian Müllner [Fri, 3 Apr 2020 12:34:21 +0000 (14:34 +0200)]
bluetooth: Fix showing menu when devices were set up

Since commit 26c2cb9f65c, nDevices is always the actual number of
paired/trusted devices. So when bluetooth is turned off, it is
now 0 rather than forced to 1 if devices were set up previously.

Fix this by checking the property that tracks set up devices instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1174

6 years agoshell-app: Ignore invalid window PIDs
Jonas Dreßler [Mon, 6 Apr 2020 18:31:46 +0000 (20:31 +0200)]
shell-app: Ignore invalid window PIDs

When building the list of window PIDs, it's possible Mutter doesn't know
about the PID the client has and meta_window_get_pid() will return 0. We
should handle this case by not adding the PID to the list of PIDs
instead of adding an invalid one to it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184

6 years agoshell-window-tracker: Detect invalid PID values of 0
Jonas Dreßler [Mon, 6 Apr 2020 18:28:00 +0000 (20:28 +0200)]
shell-window-tracker: Detect invalid PID values of 0

MetaWindows get_pid() API changed to use the client PID, which also
works for Wayland clients instead of only X11 clients now. This API
returns 0 instead of -1 for invalid PIDs, so update our check according
to that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184

6 years agotheme: tone down weekend with events
Jakub Steiner [Mon, 6 Apr 2020 15:43:51 +0000 (17:43 +0200)]
theme: tone down weekend with events

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2588

6 years agoUpdate Ukrainian translation
Yuri Chornoivan [Mon, 6 Apr 2020 16:19:08 +0000 (16:19 +0000)]
Update Ukrainian translation

6 years agoanimation: Set size through CSS
Georges Basile Stavracas Neto [Mon, 6 Apr 2020 14:19:28 +0000 (11:19 -0300)]
animation: Set size through CSS

Pretty much the same case of the previous commit: we want this size
to be scale-dependant, and using the width and height properties of
ClutterActor doesn't automatically update.

Use CSS to set the width and height.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agoappDisplay: Set the folder icon geometry through CSS
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 21:09:09 +0000 (18:09 -0300)]
appDisplay: Set the folder icon geometry through CSS

The CSS engine is scale-aware, whereas simply setting the
width and height properties directly isn't.

Use CSS to set the folder icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-node: Use the node's scale factor
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 21:04:13 +0000 (18:04 -0300)]
st/theme-node: Use the node's scale factor

Each node stores the scale factor in place when it was created.
Creating nodes with the same style, but with different scale
factors, yields different nodes.

Use the node's scale factor instead of retrieving the context's
one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-node: Consider scale factor when comparing
Georges Basile Stavracas Neto [Fri, 3 Apr 2020 20:44:54 +0000 (17:44 -0300)]
st/theme-node: Consider scale factor when comparing

The CSS engine of St is scale-aware, which means every length
and size it produces is multiplied by the current scale factor.

However, the individual nodes aren't aware of the scale factor
when they compare to each other.

Store and compare the scale factors in the nodes themselves.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1635

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-context: Add a getter for the scale-factor property
Georges Basile Stavracas Neto [Mon, 6 Apr 2020 14:15:38 +0000 (11:15 -0300)]
st/theme-context: Add a getter for the scale-factor property

Will be used by the next commit to avoid going through the GObject
machinery when retrieving the scale factor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176

6 years agost/theme-context: Also invalidate root node on stylesheet changes
Jonas Dreßler [Mon, 6 Apr 2020 00:11:27 +0000 (02:11 +0200)]
st/theme-context: Also invalidate root node on stylesheet changes

Since commit 6a42d7726119c538d260e54cdbe2f31e5fbeb03c we invalidate the
cached properties for each theme node on stylesheet changes by iterating
over the hashtable of the theme context instead of listening to the
signal in each individual theme node.

That commit forgot one particular node though that's not stored in the
hashtable, but using the `priv->root_node` property instead: The theme
node that belongs to the stage.

So make sure we also invalidate the cached properties of the stage theme
node on stylesheet changes. This fixes various crashes that happened
with extensions providing custom stylesheets (emitting the
"custom-stylesheets-changed" signal on every extension enable/disable),
trying to access an already freed CSS property of the stage.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2584
6 years agoshell-app: Use container widget for fallback X11 app icons
Jonas Dreßler [Sun, 5 Apr 2020 18:38:21 +0000 (20:38 +0200)]
shell-app: Use container widget for fallback X11 app icons

Just like StIcon does, we should use a container widget for the fallback
app icon that we get using the cairo surface property. It's needed
because the widget returned by shell_app_create_icon_texture() can be
resized freely, while we want the aspect ratio of the actual texture to
remain the same.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2578
6 years agodata: Add extension-portal desktop file
Florian Müllner [Thu, 2 Apr 2020 14:53:40 +0000 (16:53 +0200)]
data: Add extension-portal desktop file

Now that the extension preference dialog is opened by a separate
D-Bus service rather than the Extensions app, it can be opened
without a parent window that provides name and icon.

Fix this by adding back a hidden .desktop file.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2562

6 years agoextension-tool: Use enable/disable D-Bus API if possible
Florian Müllner [Tue, 23 Jul 2019 23:37:09 +0000 (23:37 +0000)]
extension-tool: Use enable/disable D-Bus API if possible

Commit 4589da957 added D-Bus API for enabling/disabling extensions,
use that if possible to provide better feedback and not clutter the
settings with non-existent UUIDs.

The old code path is preserved as fallback to keep the commands
working from outside a running shell session.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool/uninstall: Error out for system extensions
Florian Müllner [Sat, 14 Mar 2020 10:38:38 +0000 (11:38 +0100)]
extensions-tool/uninstall: Error out for system extensions

UninstallExtensions() only returns whether the operation was successful,
not why it failed. However we know that only user extensions can be
uninstalled, so check that first to provide a more meaningful error.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Split out get_extension_property() helper
Florian Müllner [Sat, 14 Mar 2020 10:38:24 +0000 (11:38 +0100)]
extensions-tool: Split out get_extension_property() helper

For the prefs command, we first fetch the extension info to check
whether the extension exists and actually has preferences. This
pattern can be useful for other commands and properties, so split
out a generic helper function.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Log existing errors
Florian Müllner [Sat, 14 Mar 2020 10:00:49 +0000 (11:00 +0100)]
extensions-tool: Log existing errors

In many cases we currently only indicate failure in the return value,
which is easily missed. Print some meaningful errors instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-tool: Add common option to silence errors
Florian Müllner [Sat, 14 Mar 2020 11:58:04 +0000 (12:58 +0100)]
extensions-tool: Add common option to silence errors

Error reporting is useful when used interactively, but often undesirable
when used in scripts. Account for that with a common --quiet option,
which is more convenient than redirection stderr to /dev/null.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391

6 years agoextensions-app: Validate .desktop file during meson test
Florian Müllner [Wed, 1 Apr 2020 04:18:05 +0000 (06:18 +0200)]
extensions-app: Validate .desktop file during meson test

... if desktop-file-validate is available.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160

6 years agoextensions-app: Add category in .desktop file
Florian Müllner [Tue, 31 Mar 2020 22:09:38 +0000 (00:09 +0200)]
extensions-app: Add category in .desktop file

Predefined categories aren't a great way for organizing installed
applications, but they have their use in "stores" like Software
or flathub.

Not listing any category means we fall through the cracks, so
pick the (hopefully) least inappropriate one ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160